package com.itheima.pojo;


import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;


import java.io.Serializable;
import java.util.Date;

/**
 * ElasticSearch 实体类
 */

@Document(indexName = "blog", type = "docs")
public class BlogInfo implements Serializable {

    private static final long serialVersionUID = 6109283079205881581L;

    /**
     * 唯一uid
     */
    @Id
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String uid;

    /**
     * 博客标题
     */
    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String title;

    /**
     * 博客简介
     */
    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String summary;

    /**
     * 博客内容
     */
    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String content;

    /**
     * 标签uid
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String tagUid;

    /**
     * 博客点击数
     */
    @Field(index = true, store = true, type = FieldType.Long)
    private Long clickCount;

    /**
     * 博客收藏数
     */
    @Field(index = true, store = true, type = FieldType.Long)
    private Long collectCount;

    /**
     * 标题图片uid
     */
    @Field(index = false, store = true, type = FieldType.Keyword)
    private String fileUid;

    /**
     * 状态
     */
    @Field(index = false, store = true, type = FieldType.Integer)
    private Integer status;

    /**
     * 创建时间
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private Date createTime;

    /**
     * 更新时间
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private Date updateTime;

    /**
     * 管理员uid
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String adminUid;

    /**
     * 是否原创（0:不是 1：是）
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String isOriginal;

    /**
     * 作者
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String author;

    /**
     * 文章出处
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String articlesPart;

    /**
     * 博客分类UID
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String blogSortUid;

    /**
     * 推荐等级(0:正常)
     */
    @Field(index = false, store = true, type = FieldType.Integer)
    private Integer level;

    /**
     * 是否发布：0：否，1：是
     */
    @Field(index = true, store = true, type = FieldType.Keyword)
    private String isPublish;

    /**
     * 排序字段
     */
    @Field(index = false, store = true, type = FieldType.Long)
    private Long sort;

    /**
     * 是否开启评论(0:否 1:是)
     */
    @Field(index = false, store = true, type = FieldType.Integer)
    private Integer startComment;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTagUid() {
        return tagUid;
    }

    public void setTagUid(String tagUid) {
        this.tagUid = tagUid;
    }

    public Long getClickCount() {
        return clickCount;
    }

    public void setClickCount(Long clickCount) {
        this.clickCount = clickCount;
    }

    public Long getCollectCount() {
        return collectCount;
    }

    public void setCollectCount(Long collectCount) {
        this.collectCount = collectCount;
    }

    public String getFileUid() {
        return fileUid;
    }

    public void setFileUid(String fileUid) {
        this.fileUid = fileUid;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getAdminUid() {
        return adminUid;
    }

    public void setAdminUid(String adminUid) {
        this.adminUid = adminUid;
    }

    public String getIsOriginal() {
        return isOriginal;
    }

    public void setIsOriginal(String isOriginal) {
        this.isOriginal = isOriginal;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getArticlesPart() {
        return articlesPart;
    }

    public void setArticlesPart(String articlesPart) {
        this.articlesPart = articlesPart;
    }

    public String getBlogSortUid() {
        return blogSortUid;
    }

    public void setBlogSortUid(String blogSortUid) {
        this.blogSortUid = blogSortUid;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getIsPublish() {
        return isPublish;
    }

    public void setIsPublish(String isPublish) {
        this.isPublish = isPublish;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public Integer getStartComment() {
        return startComment;
    }

    public void setStartComment(Integer startComment) {
        this.startComment = startComment;
    }
}
